package com.xbongbong.saas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

/**
 * 钉钉的页面路径枚举类
 * @author 魏荣杰
 * @date 2019/4/16 17:09
 * @since
 * @version
 */
@Getter
public enum DingtalkPageUrlEnum {

    /**
     * 首页
     */
    INDEX("enum.dingtalkPageUrl.name.index","?corpid=%s"),

    /**
     * 详情
     */
    CUSTOMER_DETAIL("enum.dingtalkPageUrl.name.customer_detail","/detail/customer?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=100&saasMark=1"),


    CONTACT_DETAIL("enum.dingtalkPageUrl.name.contact_detail","/detail/contacts?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=401&saasMark=1"),


    OPPORTUNITY_DETAIL("enum.dingtalkPageUrl.name.opportunity_detail","/detail/sales?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=301&saasMark=1"),


    COMMUNICATE_PLAN_DETAIL("enum.dingtalkPageUrl.name.communicate_plan_detail","/detail/communicate-plan?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=601&saasMark=1"),


    COMMUNICATE_DETAIL("enum.dingtalkPageUrl.name.communicate_detail","/detail/communicate-record?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=501&saasMark=1"),


    JXC_COMMUNICATE_DETAIL("enum.dingtalkPageUrl.name.jxc_communicate_detail","/detail/communicate-record-supplier?dataId=%s&appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=502"),


    CONTRACT_DETAIL("enum.dingtalkPageUrl.name.contract_detail","/detail/contract?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=201&saasMark=1"),


    QUOTATION_DETAIL("enum.dingtalkPageUrl.name.quotation_detail","/detail/quotation?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=4700&saasMark=1"),


    PAYMENT_PLAN_DETAIL("enum.dingtalkPageUrl.name.payment_plan_detail","/detail/receivable-management?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=701&saasMark=1"),


    PAYMENT_SHEET_DETAIL("enum.dingtalkPageUrl.name.payment_sheet_detail","/detail/receivable-sheet?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=702&saasMark=1"),

    PAY_SHEET_DETAIL("enum.dingtalkPageUrl.name.pay_sheet_detail","/detail/payment?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=802&saasMark=1"),


    INVOICE_DETAIL("enum.dingtalkPageUrl.name.invoice_detail","/detail/invoice-management?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=901&saasMark=1"),

    PURCHASE_INVOICE_DETAIL("enum.dingtalkPageUrl.name.purchase_invoice_detail","/detail/pay-invoice?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=903&saasMark=1"),

    SALE_REPORT_DETAIL("enum.dingtalkPageUrl.name.sale_report_detail","/saleBriefDetail?startTime=%s&endTime=%s"),


    WORK_REPORT_DETAIL("enum.dingtalkPageUrl.name.work_report_detail","/detail/work-report?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=2101&saasMark=1&subBusinessType=%s"),


    SIGN_IN_DETAIL("enum.dingtalkPageUrl.name.sign_in_detail","/signIn/detail?id=%s"),


    PURCHASE_DETAIL("enum.dingtalkPageUrl.name.purchase_detail","/detail/purchase-contract?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=1101&saasMark=1"),


    INSTOCK_DETAIL("enum.dingtalkPageUrl.name.instock_detail","/detail/in-stock?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=1401&saasMark=1"),


    OUTSTOCK_DETAIL("enum.dingtalkPageUrl.name.outstock_detail","/detail/out-stock?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=1501&saasMark=1"),


    SUPPLIER_DETAIL("enum.dingtalkPageUrl.name.supplier_detail","/detail/supplier?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=1001&saasMark=1"),


    BOMBILL_DETAIL("enum.dingtalkPageUrl.name.bombill_detail","/detail/bom-list?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=2601&saasMark=1"),


    PRODUCTION_ORDER_DETAIL("enum.dingtalkPageUrl.name.production_order_detail","/detail/product-order?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=2801&saasMark=1"),

    REFUND_DETAIL("enum.dingtalkPageUrl.name.refund_detail","/detail/refund-detail?dataId=%s&appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=202"),


    APPROVAL_DETAIL("enum.dingtalkPageUrl.name.approval_detail","/process/workDetail?processTaskId=%s&processNodeTaskId=%s&appId=%s&menuId=%s&formId=%s&saasMark=%s&businessType=%s&processType=%s"),

    WORKFLOW_DETAIL("enum.dingtalkPageUrl.name.approval_detail","/process-new/workDetail?processTaskId=%s&processNodeTaskId=%s&appId=%s&menuId=%s&formId=%s&saasMark=%s&businessType=%s&processType=%s"),


    WORK_ORDER_DETAIL("enum.dingtalkPageUrl.name.work_order_detail","/detail/work-order?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=2301&saasMark=1&subBusinessType=2301"),


    PRODUCT_DETAIL("enum.dingtalkPageUrl.name.product_detail","/detail/product?dataId=%s&appId=%s&menuId=%s&formId=%s&appId=%s&saasMark=1&subBusinessType=2401&businessType=2401"),

    CLUE_DETAIL("enum.dingtalkPageUrl.name.clue_detail","/detail/sales-leads?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=8000&saasMark=1"),


    CUSTOMER_LIST("enum.dingtalkPageUrl.name.customer_list","/list/customer?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=100&subBusinessType=101&dataIds=%s"),


    CUSTOMER_VIP_LIST("enum.dingtalkPageUrl.name.customer_vip_list","/list/vip-customer?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=100&subBusinessType=102"),


    CUSTOMER_DEAL_LIST("enum.dingtalkPageUrl.name.customer_deal_list","/list/deal-customer?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=100&subBusinessType=103"),


    CUSTOMER_PUBLIC_LIST("enum.dingtalkPageUrl.name.customer_public_list","/list/public-customer?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=100&subBusinessType=105&dataIds=%s"),


    CUSTOMER_NEAR_LIST("enum.dingtalkPageUrl.name.customer_near_list","/list/near-customer?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=100&subBusinessType=107"),


    CONTACT_LIST("enum.dingtalkPageUrl.name.contact_list","/list/contact?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=401&subBusinessType=401&dataIds=%s"),


    COMMMUNICATE_LIST("enum.dingtalkPageUrl.name.commmunicate_list","/list/customer-communicate?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=501&subBusinessType=501"),


    COMMUNICATE_PLAN_LIST("enum.dingtalkPageUrl.name.communicate_plan_list","/list/communicate-plan"),


    OPPORTUNITY_LIST("enum.dingtalkPageUrl.name.opportunity_list","/list/opportunity?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=301&subBusinessType=302&dataIds=%s"),


    OPPORTUNITY_FOCUS_LIST("enum.dingtalkPageUrl.name.opportunity_focus_list","/list/focus-opportunity?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=301&subBusinessType=303"),


    CONTRACT_LIST("enum.dingtalkPageUrl.name.contract_list","/list/contract?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=201&subBusinessType=201&dataIds=%s"),


    PAYMENT_PLAN_LIST("enum.dingtalkPageUrl.name.payment_plan_list","/list/payment?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=701&subBusinessType=701&dataIds=%s"),

    PAY_PLAN_DETAIL("enum.dingtalkPageUrl.name.pay_plan_detail", "/detail/pay?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=801&saasMark=1"),

    INVOICE_LIST("enum.dingtalkPageUrl.name.invoice_list","/list/invoice?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=901&subBusinessType=901&dataIds=%s"),


    WORK_REPORT_LIST("enum.dingtalkPageUrl.name.work_report_list","/list/work-report?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=2101&subBusinessType=2101"),


    WORK_ORDER_LIST("enum.dingtalkPageUrl.name.work_order_list","/workOrder/index?appId=%s&subBusinessType=2301&saasMark=1"),


    WORK_ORDER_WAIT_ROB_LIST("enum.dingtalkPageUrl.name.work_order_wait_rob_list","/workOrder/work-order-wait?filterType=workOrderWaitList&appId=%s&subBusinessType=2305&saasMark=1"),


    APPROVAL_TODO_LIST("enum.dingtalkPageUrl.name.approval_todo_list","/process/list?type=todo"),


    APPROVAL_CREATE_LIST("enum.dingtalkPageUrl.name.approval_create_list","/process/list?type=create"),


    APPROVAL_CC_LIST("enum.dingtalkPageUrl.name.approval_cc_list","/process/list?type=cc)"),


    APPROVAL_ALL_LIST("enum.dingtalkPageUrl.name.approval_all_list","/process/list?type=all"),


    SUPPLIER_LIST("enum.dingtalkPageUrl.name.supplier_list","/list-jxc/supplier?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1001&subBusinessType=1001&dataIds=%s"),


    SUPPLIER_CONTACT_LIST("enum.dingtalkPageUrl.name.supplier_contact_list","/list-jxc/supplier-contact?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1002&subBusinessType=1002&dataIds=%s"),


    SUPPLIER_COMMUNICATE_LIST("enum.dingtalkPageUrl.name.supplier_communicate_list","/list-jxc/supplier-communicate?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=502&subBusinessType=502"),


    PURCHASE_LIST("enum.dingtalkPageUrl.name.purchase_list","/list-jxc/purchase?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1101&subBusinessType=1101&dataIds=%s"),


    PURCHASE_RETURN_LIST("enum.dingtalkPageUrl.name.purchase_return_list","/list-jxc/returned-purchase?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1201&subBusinessType=1201&dataIds=%s"),


    BOM_LIST("enum.dingtalkPageUrl.name.bom_list","/list-jxc/bom-bill?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=2601&subBusinessType=2601&dataIds=%s"),


    PRODUCTION_ORDER_LIST("enum.dingtalkPageUrl.name.production_order_list","/list-jxc/production-order?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=2801&subBusinessType=2801&dataIds=%s"),


    PAY_PLAN_LIST("enum.dingtalkPageUrl.name.pay_plan_list","/list/payment-pay?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=801&subBusinessType=801&dataIds=%s"),


    ASSEMBLE_LIST("enum.dingtalkPageUrl.name.assemble_list","/list-jxc/assemble?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1301&subBusinessType=1301&dataIds=%s"),


    OUTSTOCK_LIST("enum.dingtalkPageUrl.name.outstock_list","/list-jxc/outstock?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1501&subBusinessType=1501&dataIds=%s"),


    INSTOCK_LIST("enum.dingtalkPageUrl.name.instock_list","/list-jxc/instock?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1401&subBusinessType=1401&dataIds=%s"),


    IINVENTORY_LIST("enum.dingtalkPageUrl.name.iinventory_list","/list-jxc/inventory?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1701&subBusinessType=1701&dataIds=%s"),


    TRANSFER_LIST("enum.dingtalkPageUrl.name.transfer_list","/list-jxc/transfer?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1601&subBusinessType=1601&dataIds=%s"),


    PRODUCT_LIST("enum.dingtalkPageUrl.name.product_list","/list-jxc/product?appId=%s&menuId=%s&subBusinessType=2401&saasMark=1&dataIds=%s"),


    STOCK_LIST("enum.dingtalkPageUrl.name.stock_list",""),


    WAREHOUSE_LIST("enum.dingtalkPageUrl.name.warehouse_list","/list-jxc/warehouse?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1801&subBusinessType=1801"),


    INVITE_STAFF_APP("enum.dingtalkPageUrl.name.invite_staff_app","/index.html?corpid=%s&appid=%s&dd_nav_bgcolor=ffff943e&showmenu=false#/index"),


    INVITE_STAFF_WEB("enum.dingtalkPageUrl.name.invite_staff_web","/pc-index.html?corpid=%s&appid=%s"),


    DOWNLOAD_PAGE("enum.dingtalkPageUrl.name.download_page","/message/download?downloadUrl=%s&time=%s"),


    REFUND_LIST("enum.dingtalkPageUrl.name.refund_list","/list/refund-contract?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=202&dataIds=%s"),


    QUOTATION_LIST("enum.dingtalkPageUrl.name.quotation_list","/list/quotation?appId=%s&menuId=%s&formId=%s&businessType=4700&subBusinessType=4700&saasMark=1&dataIds=%s"),


    BOMBILL_LIST("enum.dingtalkPageUrl.name.bombill_list","/list-jxc/bom-bill?appId=%s&menuId=%s&formId=%s&businessType=2601&subBusinessType=2601&saasMark=1&dataIds=%s"),


    PRODUCT_STOCK_LIST("enum.dingtalkPageUrl.name.product_stock_list","/list-jxc/product-stock?subBusinessType=1901&appId=%s&saasMark=1&businessType=2401&menuId=%s&dataIds=%s"),

    WORK_REPORT_STATISTIC("enum.dingtalkPageUrl.name.work_report_statistic","/detail/work-report/statistics-list?reportDate=%s&reportType=%s&startTime=%s&endTime=%s"),

    CLUE_LIST("enum.dingtalkPageUrl.name.clue_list","/list-market/sales-leads?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=8000&subBusinessType=8001&dataIds=%s"),

    CLUE_PUBLIC_LIST("enum.dingtalkPageUrl.name.clue_public_list","/list-market/public-clue?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=8000&subBusinessType=8002&dataIds=%s"),


    BUNDLE_GOOD_NEWS_DETAIL("enum.dingtalkPageUrl.name.bundle_good_news_detail","/group-plugin?pluginType=5&corpid=%s&dataId=%s&openConversationId=%s"),

    BUNDLE_PERFORMANCE_DETAIL("enum.dingtalkPageUrl.name.bundle_performance_detail","/group-plugin?pluginType=4&corpid=%s&dateStart=%s&dateEnd=%s&title=%s&openConversationId=%s"),

    UPDATE_GET("enum.dingtalkPageUrl.name.update_get","/application/newForm?appId=%s&menuId=%s&formId=%s&businessType=%s&saasMark=%s&dataId=%s&isOuterEdit=1"),

    DATA_WARNING_DETAIL("enum.dingtalkPageUrl.name.data_warning_detail","/chart-center/index?chartId=%s&showWarn=true&secondCategoryId=%s&dataWarningId=%s"),

    PAYMENT_TASK_DETAIL("enum.dingtalkPageUrl.name.payment_task_detail","/detail/payment-task-detail?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=5301&saasMark=1"),

    DISTRIBUTOR_DETAIL("enum.dingtalkPageUrl.name.distributor_detail","/detail/customer?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=100&saasMark=1&distributorMark=1"),

    DISTRIBUTOR_LIST("enum.dingtalkPageUrl.name.distributor_list","/list/distributor?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=100&subBusinessType=100&dataIds=%s&distributorMark=1"),

    DISTRIBUTOR_CONTACT_DETAIL("enum.dingtalkPageUrl.name.distributor_contact_detail","/detail/contacts?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=401&saasMark=1&distributorMark=1"),

    DISTRIBUTOR_COMMUNICATE_DETAIL("enum.dingtalkPageUrl.name.distributor_communicate_detail","/detail/communicate-record?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=501&saasMark=1&distributorMark=1"),

    ORDER_DETAIL("enum.dingtalkPageUrl.name.order_detail","/detail/contract?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=201&saasMark=1"),

    RETURN_DETAIL("enum.dingtalkPageUrl.name.return_detail","/detail/refund-detail?dataId=%s&appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=202"),

    MARKETING_DETAIL("enum.dingtalkPageUrl.name.order_detail","/detail/marketing?dataId=%s&appId=%s&menuId=%s&saasMark=1&subBusinessType=%s&businessType=%s&formId=%s"),

    STATEMENT_DETAIL("对账单详情", "/detail/customer-statement-detail?dataId=%s&appId=%s&menuId=%s&saasMark=1&formId=%s&businessType=5403"),

    PAAS_FORM_DETAIL("enum.dingtalkPageUrl.name.update_get","/detail/customize-form??dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=0&saasMark=2&name=%s"),

    WORK_ORDER_V2_DETAIL("enum.dingtalkPageUrl.name.work_order_v2_detail", "/detail/work-order-v2?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=%s&saasMark=%s&subBusinessType=%s"),

    RECEIPT_ORDER_DETAIL("enum.dingtalkPageUrl.name.work_order_v2_detail", "/work-order-v2/receiptOrder-mobile?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=%s&saasMark=%s&subBusinessType=%s"),
    SERVICE_PROJECT_DETAIL("enum.dingtalkPageUrl.name.work_order_v2_detail", "/detail/work-order-v2/service-project-detail?dataId=%s&appId=%s&menuId=%s&formId=%s&businessType=%s&saasMark=%s&subBusinessType=%s"),
 ;

    /**
     * 中文描述
     */
    private final String name;
    /**
     * 路径URL
     */
    private final String url;


    DingtalkPageUrlEnum(String name, String url) {
        this.name = name;
        this.url = url;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
